package top.mccat.common.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.mccat.common.core.domain.bk.BkCustomer;
import top.mccat.common.mapper.bk.BkCustomerMapper;
import top.mccat.common.service.IBkCustomerService;

/**
 * 客户Service业务层处理
 * 
 * @author raven
 * @date 2022-11-06
 */
@Service
public class BkCustomerServiceImpl implements IBkCustomerService
{
    @Autowired
    private BkCustomerMapper bkCustomerMapper;

    /**
     * 查询客户
     * 
     * @param id 客户主键
     * @return 客户
     */
    @Override
    public BkCustomer selectBkCustomerById(Integer id)
    {
        return bkCustomerMapper.selectBkCustomerById(id);
    }

    /**
     * 查询客户列表
     * 
     * @param bkCustomer 客户
     * @return 客户
     */
    @Override
    public List<BkCustomer> selectBkCustomerList(BkCustomer bkCustomer)
    {
        return bkCustomerMapper.selectBkCustomerList(bkCustomer);
    }

    /**
     * 新增客户
     * 
     * @param bkCustomer 客户
     * @return 结果
     */
    @Override
    public int insertBkCustomer(BkCustomer bkCustomer)
    {
        return bkCustomerMapper.insertBkCustomer(bkCustomer);
    }

    /**
     * 修改客户
     * 
     * @param bkCustomer 客户
     * @return 结果
     */
    @Override
    public int updateBkCustomer(BkCustomer bkCustomer)
    {
        return bkCustomerMapper.updateBkCustomer(bkCustomer);
    }

    /**
     * 批量删除客户
     * 
     * @param ids 需要删除的客户主键
     * @return 结果
     */
    @Override
    public int deleteBkCustomerByIds(Integer[] ids)
    {
        return bkCustomerMapper.deleteBkCustomerByIds(ids);
    }

    /**
     * 删除客户信息
     * 
     * @param id 客户主键
     * @return 结果
     */
    @Override
    public int deleteBkCustomerById(Integer id)
    {
        return bkCustomerMapper.deleteBkCustomerById(id);
    }
}
